#include <iostream>
#include <map>

std::pair<int,std::string> func()
{
    return {1,"zhangsan"};
}

struct Point
{
    int x;
    int y;
};

int amin()
{
    // auto pair = func();
    // std::cout<<pair.first<<" "<<pair.second<<std::endl;
    auto [id,name] = func();
    std::cout<<id<<" "<<name<<std::endl;

    std::map<int,double> m = 
    {
        {1,2.4},
        {2,4.5},
        {3,8.7}
    };
    for(auto& [id,eyes]:m)
    {
        eyes = 10;
        std::cout<<id<<" "<<eyes<<std::endl;
    }

    //绑定数组
    // int a[3] = {1,2,3};
    // auto&[x,y,z] = a;
    // x = 10;

    Point p = {1,3};
    auto& [x,y] = p;
    std::cout<<x<<" "<<y<<std::endl;
    return 0;
}